<?php
/**
 * @author Tibor Pino (tibor.pino@gmail.com)
 * @license released under GNU Public License v. 2
 * @copyright Copyright (c) 2007, Tibor Pino
 *
 */

class AdminMenuHelper extends AppHelper {

    public $helpers = array('Html');

    public function write() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('new article',true), array('controller'=>'articles','action'=>'add'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('new news',true),array('controller'=>'news','action'=>'add'));
        $content .= '</div>';
        return $this->output($content);
    }

    public function manage() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('news',true),array('controller'=>'news','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('articles',true),array('controller'=>'articles','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('categories',true),array('controller'=>'categories','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('tags',true),array('controller'=>'tags','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('comments',true),array('controller'=>'comments','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('downloads',true),array('controller'=>'downloads','action'=>'index'));
        $content .= '</div>';
        return $this->output($content);
    }

    public function settings() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('settings',true),array('controller'=>'settings','action'=>'site'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('design',true),array('controller'=>'themes','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('edit layout',true),array('controller'=>'themes','action'=>'editlayout','css'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('sideboxes',true),array('controller'=>'sideboxes','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('blacklist',true),array('controller'=>'blacklists','action'=>'index'));

        $content .= '</div>';
        return $this->output($content);
    }

    public function users() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('groups',true),array('controller'=>'groups','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('users',true),array('controller'=>'users','action'=>'index'));
        $content .= '</div>';
        return $this->output($content);
    }

    public function big_menu($active='logo') {
        $content = "<li>".$this->Html->image('fantom-logo.png',array('align'=>'left','hspace'=>5)).$this->Html->link(__('Fantom',true),array('controller'=>'statistics','action'=>'index'),array('class'=>'fantom-logo'))."</li>";
        $content .= "<li>".$this->Html->link(__('write',true),array('controller'=>'articles','action'=>'add'))."</li>";
        $content .= "<li>".$this->Html->link(__('manage content',true),array('controller'=>'articles','action'=>'index'))."</li>";
        $content .= "<li>".$this->Html->link(__('users',true),array('controller'=>'users','action'=>'index'))."</li>";
        $content .= "<li>".$this->Html->link(__('settings',true),array('controller'=>'settings','action'=>'site'))."</li>";
        $content .= "<li>".$this->Html->link(__('homepage',true),'/',array('target'=>'new'))."</li>";
        $content .= "<li>".$this->Html->link(__('logout',true),array('controller'=>'users','action'=>'logout'))."</li>";
        return $this->output($content);
    }
}
?>